package file;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description：scanner处理文本文件
 * User：chenshu
 * Date：2023-11-15
 * Time：22:40
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = new FileInputStream("test.txt");
        Scanner scanner = new Scanner(inputStream);
        String s = scanner.next();
        System.out.println(s);
        inputStream.close();
    }
}
